from django.db import models

# Create your models here.
from utils.basemodel import BaseModel
#分类模型类
class Category(BaseModel):
  name = models.CharField(max_length=100, verbose_name="分类名称")
  parent=models.ForeignKey("self",on_delete=models.CASCADE,verbose_name="父类",null=True,blank=True,related_name="children")
  intro=models.CharField(max_length=200)
  class Meta:
    db_table = "fgcategory"
  def __str__(self):
    return self.name